<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a >列表</a></li>
		</ul>
        
        <form class="well form-inline margin-top-20" method="post" action="{:url('Cash/index')}">
            订单状态：
            <select class="form-control" name="status" style="width: 100px;">
                <option value=''>全部</option>
                <volist name="status" id="v">
                    <option value="{$key}" <if condition="input('request.status') neq '' && input('request.status') eq $key">selected</if>>{$v}</option>
                </volist>
            </select>
            提交时间：
            <input class="form-control js-bootstrap-date" name="start_time" id="start_time" value="{:input('request.start_time')}" aria-invalid="false" style="width: 110px;"> - 
            <input class="form-control js-bootstrap-date" name="end_time" id="end_time" value="{:input('request.end_time')}" aria-invalid="false" style="width: 110px;">
            用户ID：
            <input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
                   placeholder="用户ID">
            订单号：
            <input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}"
                   placeholder="订单号">
            <input type="submit" class="btn btn-primary" value="搜索"/>
            <a class="btn btn-danger" href="{:url('Cash/index')}">清空</a>
			<div class="admin_main" style="margin-top:10px">
				当前提现总金额：{$cash['total']}
				<if condition="$cash['type'] eq '0'" >
					成功提现金额：{$cash['success']}
					待处理金额：{$cash['pending']}
					拒绝提现金额：{$cash['fail']}
				</if>
			</div>
        </form>
    
		<form method="post" class="js-ajax-form">
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
						<th>ID</th>
						<th>用户</th>
						<th>兑换{$configpub['name_votes']}</th>
						<th>提现金额</th>
						<th>提现账号</th>
						<th>订单状态</th>
						<th>提交时间</th>
                        <th>处理时间</th>
						<th align="center">{:lang('ACTIONS')}</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="list" item="vo">
					<tr>
						<td>{$vo['id']}</td>
						<td>{$vo['userinfo']['user_nickname']} ( {$vo['uid']} )</td>	
						<td>{$vo['votes']}</td>
						<td>{$vo['money']}</td>
						<td>{$type[$vo['type']]}<br>{$vo['name']}<br>{$vo['account']}<br>{$vo['account_bank']}</td>
						<td>{$status[$vo['status']]}</td>
                        <td>{:date('Y-m-d H:i:s',$vo['addtime'])}</td>
                        <td>
                        <if condition="$vo['status'] eq '0'" >
						    未处理
						 <else/>
						     {:date('Y-m-d H:i:s',$vo['uptime'])}
						 </if>	
                        </td>
						<td>
                            <if condition="$vo['status'] eq 0 ">
							<a class="btn btn-xs btn-success js-ajax-dialog-btn" href="{:url('Cash/setCash',array('id'=>$vo['id'],'status'=>'1'))}" data-msg="确定确认提现吗？">确认提现</a>
                            
                            <a class="btn btn-xs btn-danger js-ajax-dialog-btn" href="{:url('Cash/setCash',array('id'=>$vo['id'],'status'=>'2'))}" data-msg="确定拒绝提现吗？">拒绝提现</a>
                            </if>
						</td>
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>

		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>